<template>
  <div class="pageTemplate">
    <page-header :tab-header="tabHeader">
      <div slot="title">
        <slot name="title"></slot>
      </div>
      <div slot="right">
        <slot name="headerRight"></slot>
      </div>
    </page-header>
    <page-box v-if="!notPageBox">
      <slot name="content"></slot>
    </page-box>
    <slot
      v-else
      name="content"
    ></slot>
  </div>
</template>

<script lang='ts'>
import { Component, Prop, Vue } from 'vue-property-decorator'
import PageBox from '@/components/PageBox/index.vue'
import PageHeader from '@/components/PageHeader/index.vue'
@Component({
  components: {
    PageBox,
    PageHeader
  }
})
export default class Page extends Vue {
  @Prop({ default: false }) tabHeader !: boolean
  @Prop({ default: false }) notPageBox !: boolean
}
</script>

<style lang='scss' scoped>
.pageTemplate{
  height: 100%;
}
</style>
